Implement sign in functionality with sessions