Added auto-login, retrieve and submit functions