Authentication functionality WIP.