LoginPage and Register Function edited