Remove unnecessary codes in Login and Registration classes