Finished login system. fixes #11