fixed sign in but and added more tests