finished sign-in functionality