You don’t need to store that information, WordPress already does this, and it does this across multiple sessions.
If you log in on your phone, and on your PC, then go to your user in WP Admin, you’ll see them listed with a button to log you out on the other devices.
Additionally, WordPress stores the IP, expiration, and time the session began.
Here’s a simple snippet that will reveal this information in the user edit screen:
<?php
add_action( 'show_user_profile', 'show_sessions_debug' );
add_action( 'edit_user_profile', 'show_sessions_debug' );
function show_sessions_debug( $user ) { ?>
<table class="form-table">
<tr>
<th><label for="user_sessions_debug"><?php _e("Sessions"); ?></label></th>
<td>
<pre><?php var_dump( wp_get_all_sessions() ); ?></pre>
</td>
</tr>
</table>
<?php
}