AC-3: Added login fucionality