Added login function, failed horribly