Login checks added
Fixed login!

And cleaned up some imports.