Added unit testing and fixed bug

Added unit testing for server, but version 1.0
Still needs to finish unit testing.

Fix the bug that add user and check login not working.
The problem was as result of the password encryption.