Attempt at authentication. Some bugs present, like always showing login button