form validation connected login with select and added cookies