Added logic to sign in