@Override
	public MyUser findByName(String userName) {
		String sql = "SELECT users.username,users.password,users.votes,user_roles.role FROM users, user_roles WHERE users.username = ? AND user_roles.username = ?";
		Connection conn = null;
		MyUser user = null;
		try {
			conn = dataSource.getConnection();
			PreparedStatement ps = conn.prepareStatement(sql);
			ps.setString(1,  userName);
			ps.setString(2, userName);
			ResultSet rs = ps.executeQuery();
			if (rs.next()) {
				user = new MyUser();
				user.setUserName(rs.getString(1));
				user.setPassWord(rs.getString(2));
				user.setTotalVotes(rs.getLong(3));
				user.setRole(rs.getString(4));
			}
			rs.close();
			ps.close();
			return user;
		} catch (SQLException e) {
			throw new RuntimeException(e);
		} finally {
			if (conn != null) {
				try {
				conn.close();
				} catch (SQLException e) {}
			}
		}
	}