Moved the registration and login to the SelectField. It is working
Added common_render_template and moved tha appropriate views to use it.