User login almost complete

The last commit and this is not tested so i don't know if this code even
works buuuut #yolo