corrected reg./login process
rewritten tests