That's because on login page that field is not called "s_email", but "email".
Anyway, there are more pages including email input fields (Contact -Site and advertiser, Share Ad...), and there's no real harm in including this code for any page, so here's what should be a universal version:
<?php
function cust_trim_email_field() { ?>
<script type="text/javascript">
$('#s_email, #email, #contactEmail, #yourEmail').on('keyup', function() {
$(this).val($(this).val().trim());
});
</script>
<?php }
osc_add_hook('footer', 'cust_trim_email_field', 10);
?>
Regards