finished user logging functionality