Fixed sign-in functionality