add bit of stuff abour registering
better error checking
Now user registered can login (good salt saved)