Optimizing login and register processes / fix md5 bug