Made the sign in functionality work