working login and better pop up messages