[#71713116] updated method to take a user and wrote a test for the log_user_in method

Signed-off-by: Paul Wenig <pwenig@gmail.com>