@Transactional
	public UserDetails loadUserByUsername(String username)
			throws UsernameNotFoundException{
		
		try {
			
			Person p = personModelDao.getPersonByLogin(username);					
			
			boolean enabled = true;
			boolean accountNonExpired = true;
			boolean credentialsNonExpired = true;
			boolean accountNonLocked = true;
			
			Collection<GrantedAuthority> grantedAuthorities = new ArrayList<GrantedAuthority>();
			grantedAuthorities.add(new GrantedAuthorityImpl(p.getRole().getName())); // RoleName = "ROLE_ADMIN" or "ROLE_USER"
			
			
			org.springframework.security.core.userdetails.User user = new org.springframework.security.core.userdetails.User(p.getUsername(), p.getPassword(), enabled, accountNonExpired,
					credentialsNonExpired, accountNonLocked, grantedAuthorities);
			
			return user;
			
		} catch (NoResultException e) {
			throw new UsernameNotFoundException("No such user");
		}
			
	}