Made some fixes when login in