Handle form for login and edit and delete