Bug Fixes

fixed several bugs and added some small functionality for user logins