added JAAS login helper method to make JAAS login easier