Added login page and make several fixes