Added login functionality. Other changes