If you're looking for a simple solution, saving the user name and password in user settings would work. However, this approach is not very secure at all because any other user with sufficient privileges on this machine could simply read the saved settings and steal your login details.