Connects to the remote server and logs in with the given credentials. After successfully executing this, {@link #isLoggedIn()} will be trueand {@link #getSubject()} will return the subject that this method returns.
@param user
@param password
@return the logged in user
@throws Exception if failed to connect to the server or log in
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.