Add function to login button