created login and registration function and main layout