Login functionality almost finish