fixed sha password hash incorrectly saved, fixed login cookie not being
checked properly