Changed layout logic for not signed in users and added more validation rules