Modified code to allow for both username/password and apikey logins and documentation as well

Modified code to allow users to log in with either a username and password combination or with an apikey. Also modified the documentation to reflect the changes.