class SessionManager extends ConcurrentHashMap<String, Session> {

	public synchronized Session newSession(String username, String password, String key, Client client)
			throws AuthenticationException {
		User user = authenticationChain.authenticate(username, password, key, client);
		if (user == null)
			return null;
		else {
			return createSession(user, password, key, client);
		}
	}

	private  SessionManager();

}